# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=t50
pkgver=5.8.7c
pkgrel=1
epoch=1
groups=('blackarch' 'blackarch-dos' 'blackarch-networking')
pkgdesc='Experimental Multi-protocol Packet Injector Tool.'
arch=('x86_64' 'aarch64')
url='https://gitlab.com/fredericopissarra/t50/-/releases'
license=('GPL2')
depends=('glibc' 'linux-headers')
source=("https://gitlab.com/fredericopissarra/$pkgname/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz")
sha512sums=('6b7fcbd25c0b2f6211cc9b4005f47cd97840863a4054f3b9fe495d970d482ff992256262703948cce0a5572292d47b433ac88577f371185449ae4b4a8b967ef9')

build() {
  cd "$pkgname-v$pkgver"

  make
}

package() {
  cd "$pkgname-v$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/man/man8"

  #make DESTDIR="$pkgdir" install

  install -Dm 755 "bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" TODO CHANGELOG doc/*.md \
    doc/README.modules
  install -Dm 644 "doc/$pkgname.8" "$pkgdir/usr/share/man/man8/$pkgname.8"
}

